<template>
  <div>
    <div class="Taking_box">
      <div class="T-order_title">
        <span>公共</span>
        <a href="#">{{ detailinfo.takeOrderTitle }}</a>
      </div>
      <div class="T-game-info">
        <span>{{ detailinfo.gameInfo }}</span>
      </div>
      <div class="T-game-price">
        <div class="order_price">
          ￥<span>{{ detailinfo.price }}</span
          >.00
        </div>
        <span>可投保</span>
      </div>
      <div class="require">
        <div class="left">
          <div class="top">
            <span class="num">{{ detailinfo.time }}</span>
            <span class="text">小时</span>
          </div>
          <div class="footer">代练限时</div>
        </div>
        <div class="middle">
          <div class="top">
            <span class="num">{{ detailinfo.money }}</span>
            <span class="text">元</span>
          </div>
          <div class="footer">安全保证金</div>
        </div>
        <div class="right">
          <div class="top">
            <span class="num">{{ detailinfo.money }}</span>
            <span class="text">元</span>
          </div>
          <div class="footer">效率保障金</div>
        </div>
      </div>
    </div>

    <p class="blank"></p>
    <div class="msg-info">
      <div class="title">订单信息</div>
      <div class="content">
        <div class="T-bzj-info">
          <span class="codenum"
            >订单编号：{{ detailinfo.playerAccount
            }}{{ $route.params.takeOrderId }}</span
          >
          <span class="copy" @click="copyText">复制</span>
        </div>
        <div class="T-fbz-time">发布时间：{{ detailinfo.devtime }}</div>
        <div class="T-fbz-author">
          <span class="order">发单者昵称：{{ detailinfo.ordername }}</span>
          <span @click="guanzhu = !guanzhu">
            <a class="guanzhu" v-if="guanzhu == true">+ 关注</a>
            <a v-if="guanzhu == false">不关注</a>
          </span>
        </div>
      </div>
    </div>
    <p class="blank"></p>
    <div class="order-info">已接订单：{{ detailinfo.wechatOrder }} 个</div>
    <p class="blank"></p>
    <div class="req-box">
      <div class="title">代练要求</div>
      <span
        >QQ区请卸载QQ后登陆游戏,必须关定位后再开打,接单后尽量30分钟内上号开始
        <br />1、接手和完成,请上传排行榜图,指定英雄必须上传指定英雄战绩记录截图
        <br />2丶指定英雄订单,务必上传使用指定英雄记录图(被Ban被抢务必截图)
        <br />2、战力订单不可以掉接单时候的原段位以及巅峰赛分数,否则按市场价扣除
        <br />3、禁止私自使用账号物品,必须经过我们同意才能使用,否则扣双金
        <br />4、禁止转单,禁止使用非法软件外挂等,发现冻结资金永久封停
        <br />5、战绩差,8局内输的比赢的多,连跪,未完成任务,胜率低,不考虑进度
        <br />6、高级套餐:胜率低于70%或打手原因单方面中途撤单支付代练费0元
        <br />7丶订单3连跪一页4红及以上我方有权申请撤单要求赔付效率金
        <br />★严禁将接单价格、ping苔等信息透露给号主,违反扣除全部保证金</span
      >
    </div>
  </div>
</template>

<script>
import { getGameInfo } from "../api/gameapi.js";
import orderlist from "../store/orderlist";
export default {
  data() {
    return {
      guanzhu: true,
    };
  },
  computed: {
    detailinfo() {
      console.log(this.$store.state.detailInfo);
      return this.$store.state.orderlist.detailInfo;
    },
  },
  created() {
    console.log(this.$route.params);
    let { takeOrderId } = this.$route.params;
    console.log(takeOrderId);
    getGameInfo(takeOrderId).then((res) => {
      // console.log(1);
      // console.log(res);
    });
  },
  methods: {
    copyText() {
      console.log(this.$refs.p);
      var text = document.querySelector(".codenum").innerText;
      var codenum = text.split("：")[1];
      console.log(codenum);
      alert("复制成功,编号:" + codenum);
    },
  },
};
</script>

<style src="../assets/css/gameorder.css" scoped>
</style>